Annotate values of PRIORITY constants
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Sat, 22 Dec 2018 00:00:00 +0000 (00:00 +0000)
committerChristoph Reiter <creiter@src.gnome.org>
Sat, 22 Dec 2018 17:52:20 +0000 (18:52 +0100)
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```

See !472

gdk/gdkevents.h
gtk/gtkmain.h
gtk/gtktextview.h

index 8ec949c606a27536fe4245541823a497e741372a..5aa74b94ee1cfdbf2437c68d817c3fe1fbc97de8 100644 (file)
@@ -54,7 +54,7 @@ G_BEGIN_DECLS
 #define GDK_PRIORITY_EVENTS    (G_PRIORITY_DEFAULT)
 
 /**
- * GDK_PRIORITY_REDRAW:
+ * GDK_PRIORITY_REDRAW: (value 120)
  *
  * This is the priority that the idle handler processing surface updates
  * is given in the
index b80da107d54923f11244226f3095169783149448..81c1e574ada79f83f62ea92ce41d25dc80fea812 100644 (file)
@@ -40,7 +40,7 @@
 G_BEGIN_DECLS
 
 /**
- * GTK_PRIORITY_RESIZE:
+ * GTK_PRIORITY_RESIZE: (value 110)
  *
  * Use this priority for functionality related to size allocation.
  *
index 09840f29e822e077eb3624aac25e304b9bf738c1..74256b487756a10a163dad94095e1284d34cf7a6 100644 (file)
@@ -97,7 +97,7 @@ typedef enum
 } GtkTextExtendSelection;
 
 /**
- * GTK_TEXT_VIEW_PRIORITY_VALIDATE:
+ * GTK_TEXT_VIEW_PRIORITY_VALIDATE: (value 125)
  *
  * The priority at which the text view validates onscreen lines
  * in an idle job in the background.